package com.rd.student.ruanjian.class4.baiyunyao.DAY0728;

import java.util.Random;


public class jiamiani {
    public static  void main(String[] args) {

        Random jiami = new Random();
        int mimi = 0;
        for (int i = 0; i < 5; i++) {
            mimi = jiami.nextInt(10);
            System.out.println(mimi);


        }
        int xiioume = (mimi + 5) / 10;
        System.out.println(xiioume);

 int[] mimixixigetmimi = new int[xiioume];
        for (int i = 0; i < mimixixigetmimi.length; i++) {
            int num = jiami.nextInt(50);
            System.out.println();}
        int len = mimixixigetmimi.length;
        int n = 20;
        int[] indexArr = new int[n];
        for (int x = 0; x < n; x++) {
            int index = (int) (Math.random() * len);
            boolean flag = false;
            for (int j = 0; j < x; j++) {
                if (index == indexArr[j]) {
                    flag = true;
                    break;
                }
            }
            if (flag) {
                x--;
                continue;
            }
            indexArr[x] = index;
          ;
        }



    }}
